<template>
	<view class="informationdetail">
		<view class="header">
			
		</view>
		<!-- 标题 -->
		<view class="title">
		  {{inforMationDetail.title}}
		</view>
		<!-- 主图 -->
		<view class="banner">
			<image class="informationDetail-img" :src="inforMationDetail.image"></image>
		</view>
		<!-- 资讯内容 -->
		<view class="detail-content">
			{{inforMationDetail.content}}
		</view>
		<view >
		</view>
		<view class="footer">
			<image class="footerimg" src="https://wlsy.nanjingyunpeng.cn/weixin/image/footerImg.png"></image>
		</view>
	</view>

</template>

<script>
	import {
		getinformation
		
	} from "../../api/api.js"
	export default {
		data() {
			return {
             id:"",
			 inforMationDetail:{
				 id:1,
				 title:"",
				 content:"",
				 image:""
			 }
			}
		},
		onLoad: function(option) {
			// console.log("iiiiiid", option.id);
			this.id = option.id
			this.getinformation()
			
		},
		methods:{
			async getinformation(){
				let res = await getinformation({id:this.id})
				if(res.code == 1000){
					// console.log("资讯详情",res.data.data)
					this.inforMationDetail.title = res.data.data[0].title
					this.inforMationDetail.content = res.data.data[0].content.substring(3).substring(0,res.data.data[0].content.length-7)
					this.inforMationDetail.user_zan = res.data.data[0].user_zan
					this.inforMationDetail.zan_num = res.data.data[0].zan_num
				}
			},
		}
		
	}
</script>

<style scoped lang="scss">
	.informationdetail{
		background-color: #EEF7FE;
		min-width: 100% ;
		min-height: 100%;
		padding: 50rpx;
		padding-top: 70rpx;
		box-sizing: border-box;
		.header{
			width: 750rpx;
			height: 40rpx;
			background:#466EE7 ;
			border-radius: 0rpx 0rpx 60rpx 60rpx;
			position: fixed;
			top: 0;
			left: 0;
		}
	}
	.title{
		width: 690rpx;
		height: 88rpx;
		font-size: 32rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
		line-height: 38rpx;
		
	}
	.banner{
		width: 650rpx;
		height: 360rpx;
		margin-bottom: 40rpx;
		margin-top: 40rpx;
	}
	.informationDetail-img{
		width: 100%;
		height: 100%;
	}
	.detail-content{
		font-size: 15px;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
		line-height: 22px;
		
	}
	.footer {
		width: 750rpx;
		height: 324rpx;
		position: fixed;
		bottom: 0;
		left: 0;
	
		.footerimg {
			width: 100%;
			height: 100%;
		}
	}
</style>
